package com.soecode.lyf.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.soecode.lyf.dao.RecordDao;
import com.soecode.lyf.entity.Collect;
import com.soecode.lyf.service.RecordService;
@Service
public class RecordServiceimpl implements RecordService {
	
	@Autowired
	private RecordDao recordDao;
	
	@Override
	public List<Collect> selectRecord(String userid){ // 查询阅读记录
		return recordDao.selectRecord(userid);
	}
	@Override
	public Collect SelectRecorded(String imgtext,String userid) {
		return recordDao.SelectRecorded(imgtext,userid);
	}
	@Override
	public int deleteRecord(String userid,String jcname) { // 删除阅读记录
		return recordDao.deleteRecord(userid,jcname);
	}
	@Override
	public int addRecord(String imgpath, String imgtext, String imghref, String router, String userid,String time,String jcread) {
		return recordDao.addRecord(imgpath,imgtext,imghref,router,userid,time,jcread);
	}
	@Override
	public int updateRecord(String imgtext,String userid,String time) { // 如果表里存在记录则更新时间字段
		return recordDao.updateRecord(imgtext,userid,time);
	}
	@Override
	public int updateProgress(String userid, String progresstext, String progress, String progressarr) {
		return recordDao.updateProgress(userid,progresstext,progress,progressarr);
	}
	@Override
	public int updateExperience(String userid) { // 增加经验
		return recordDao.updateExperience(userid);
	}
}
